﻿namespace AbpCqrsTest.Commands
{
	using System.Threading;
	using System.Threading.Tasks;

	using Abp.Domain.Uow;

	using AbpPlus.Bus;
	using AbpPlus.Commands;
	using AbpPlus.Events;

	using MediatR;

	/// <summary>
	/// The hello world command handler.
	/// </summary>
	public class HelloWorldCommandHandler
		: CommandHandler,
		ICommandHandler<HelloWorldCommand>
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="HelloWorldCommandHandler"/> class.
		/// </summary>
		/// <param name="uow">
		/// The uow.
		/// </param>
		/// <param name="bus">
		/// The bus.
		/// </param>
		/// <param name="notifications">
		/// The notifications.
		/// </param>
		public HelloWorldCommandHandler(
			IUnitOfWorkManager uow, 
			IMediatorHandler bus, 
			INotificationHandler<DomainNotification> notifications)
			: base(uow, bus, notifications)
		{
		}

		/// <summary>
		/// The handle.
		/// </summary>
		/// <param name="message">
		/// The message.
		/// </param>
		public void Handle(HelloWorldCommand message)
		{
		}

		/// <summary>
		/// The handle.
		/// </summary>
		/// <param name="notification">
		/// The notification.
		/// </param>
		/// <param name="cancellationToken">
		/// The cancellation token.
		/// </param>
		/// <returns>
		/// The <see cref="Task"/>.
		/// </returns>
		public async Task Handle(HelloWorldCommand notification, CancellationToken cancellationToken)
		{
			await Task.FromResult(0);
		}
	}
}